import axios from '../utils/request'

// 售房
const pageHouse = (body) => { // 分页
  return axios.post('/changepage', body)
}
const addHouse = (body) => { // 添加房源
  return axios.post('/addNewdreass', body)
}
const searchHouse = (body) => { // 房源模糊搜索
  return axios.post('/search', body)
}
const editHouse = (body) => { // 房源编辑
  return axios.post('/updataAddre', body)
}
const deleteHouse = (id) => { // 房源删除
  return axios.post('/deleteAdd', { id })
}

// 房屋租赁
const pageLease = (body) => { // 分页
  return axios.post('/changepage', body)
}
const leaseAdd = (body) => { // 添加房源
  return axios.post('/Rental', body)
}
const leaseSearch = (body) => { // 房源模糊搜索
  return axios.post('/RentalSearch', body)
}
const leaseEdit = (body) => { // 房源编辑
  return axios.post('/changeRentl', body)
}
const leaseDelete = (id) => { // 房源删除
  return axios.post('/deleteRent', { id })
}

// 直播管理
const getStream = (body) => { // 获取直播管理数据
  return axios.post('/getVadio', body)
}
const streamSearch = (body) => { // 直播搜索
  return axios.post('/searchName', body)
}
const streamFiltrate = (body) => { // 直播筛选
  return axios.post('/select', body)
}

// 团购
const getGroupData = (body) => { // 获取团购数据
  return axios.post('/getList', body)
}
const delGroup = (body) => { // 删除团购数据
  return axios.post('/delete', body)
}
const searchGroup = (body) => {
  return axios.post('/searchTeam', body)
}
const selectGroup = (body) => {
  return axios.post('/selectState', body)
}

// 审核管理
const getAuditData = (query) => {
  return axios.get('/getData', { params: query })
}
const auditSearch = (body) => {
  return axios.post('/searchVal', body)
}
const auditDelete = (body) => {
  return axios.post('/handleDelete', body)
}
const auditEdit = (body) => {
  return axios.post('/handleEdit', body)
}
const Auditby = (body) => {
  return axios.post('/audit', body)
}

// 订单管理
const getOrder = (query) => { // 获取订单数据
  return axios.get('/getOrder', { params: query })
}
const orderFilter = (body) => { // 筛选订单
  return axios.post('/OrderSelect', body)
}
const orderSearch = (body) => { // 订单搜索
  return axios.post('/searchInp', body)
}
const orderDelete = (body) => { // 订单删除
  return axios.post('/orderDelete', body)
}

// 资讯管理
const getInformation = (query) => { // 获取数据
  return axios.get('/getInfore', { params: query })
}
const inforSearch = (body) => { // 查找
  return axios.post('/searchInfore', body)
}
const inforSelect = (body) => { // 筛选
  return axios.post('/selectInfore', body)
}
const inforAdd = (body) => { // 添加
  return axios.post('/addInfore', body)
}
const inforEdit = (body) => { // 编辑
  return axios.post('/changeInfore', body)
}
const inforDelete = (body) => { // 删除
  return axios.post('/deleteInfore', body)
}

// 经纪人管理
const getBroker = (query) => { // 获取数据
  return axios.get('/getAgent', { params: query })
}
const brokerSearch = (body) => { // 查找
  return axios.post('/searchAgen', body)
}
const brokerSelect = (body) => { // 筛选
  return axios.post('/agnetSelect', body)
}
const brokerAdd = (body) => { // 添加
  return axios.post('/addAgent', body)
}
const brokerEdit = (body) => { // 编辑
  return axios.post('/changeAgent', body)
}
const brokerDelete = (body) => { // 删除
  return axios.post('/deleteAgent', body)
}

// 三级联动
const getProvince = (query) => {
  return axios.get('/sheng', { params: query })
}
const getCity = (body) => {
  return axios.post('/shi', body)
}
const getArea = (body) => {
  return axios.post('/xian', body)
}
export default {
  addHouse,
  searchHouse,
  editHouse,
  pageHouse,
  deleteHouse,
  pageLease,
  leaseAdd,
  leaseSearch,
  leaseEdit,
  leaseDelete,
  getStream,
  streamSearch,
  streamFiltrate,
  getGroupData,
  delGroup,
  searchGroup,
  selectGroup,
  getAuditData,
  auditSearch,
  auditDelete,
  auditEdit,
  getProvince,
  getCity,
  getArea,
  Auditby,
  getOrder,
  orderFilter,
  orderSearch,
  orderDelete,
  getInformation,
  inforSearch,
  inforSelect,
  inforAdd,
  inforEdit,
  inforDelete,
  getBroker,
  brokerSearch,
  brokerSelect,
  brokerAdd,
  brokerEdit,
  brokerDelete
}
